package com.zby.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

public enum OrderStatus {
//    订单状态(0:待付款 1:待发货  2:待确认 3:交易成功 4:交易关闭 5:已发货 6:已确认)
    WAIT_PAYMENT(0, "待付款"),
    WAIT_DELIVER(1, "待发货"),
    WAIT_CONFIRM(2, "待确认"),
    SUCCESS(3, "交易成功"),
    CLOSED(4, "交易关闭"),
    DELIVERED(5, "已发货"),
    CONFIRMED(6, "已确认"),
    RETURN_SUCCESS(7, "退货成功"),
    RETURNED(8, "退货中"),
    RETURN_FAIL(9, "退货失败")
    ;
    @EnumValue
    private Integer code;
    @JsonValue
    private String message;
    OrderStatus(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
